package com.xueyi.game.backend.entity.dto;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.NotNull;

/**
 * @author: hxs
 * @createDate: 2022/11/9 11:25
 * @description: 为角色关联权限参数
 */
@Data
public class BindJurisdictionForRoleDto {
    /**
     * id
     */
    @NotNull(message = "参数异常")
    private Integer roleId;

    /**
     * 权限id
     */
    private String jurisdictionId;

    public void format() {
        jurisdictionId = StringUtils.isBlank(jurisdictionId) ? null : jurisdictionId.trim();
    }
}
